package com.ssyc.gsk_teacher_appraisal.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.ssyc.common.base.LazyBaseFragment;
import com.ssyc.common.view.MyListView;
import com.ssyc.gsk_teacher_appraisal.R;

/**
 * 选词填句子
 * Created by Administrator on 2018/9/3 0003.
 */

public class AppraisalChooseWordFillSentenceFragment extends LazyBaseFragment {

    /**
     * 选择答案
     */
    private TextView tv_content;
    private MyListView lv;


    //展示你的作答,正确答案,每个选项的正确率以及题目解析的相关视图
    //该视图只有在已完成状态下才显示出来
    private LinearLayout llShowAnswer;
    //你的答案
    private TextView tv_own_answer;
    //正确答案
    private TextView tv_right_answer;
    //展示选项正确率的ListView
    private MyListView lv_show_answer;
    //解析
    private TextView tv_parse_answer;

    /**
     * 获取当前Fragment对象方法
     *
     * @return
     */
    public static final AppraisalChooseWordFillSentenceFragment newInstance() {
        AppraisalChooseWordFillSentenceFragment appraisalChooseWordFillSentenceFragment = new AppraisalChooseWordFillSentenceFragment();
        Bundle bundle = new Bundle();
        appraisalChooseWordFillSentenceFragment.setArguments(bundle);
        return appraisalChooseWordFillSentenceFragment;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_teacher_class_choose_word_fill_sentence;
    }

    @Override
    protected boolean isNeedShowTitle() {
        return false;
    }

    @Override
    protected String setTitleText() {
        return null;
    }

    @Override
    public void lazyInit(View view, Bundle savedInstanceState) {

    }

    @Override
    protected void init(View view, Bundle savedInstanceState) {
        super.init(view, savedInstanceState);

        //显示内容
        showContent();

        //获取页面对象
        initIntent();

        //初始化视图
        initView(view);

        //设置数据
        initLv();

        //老师端已考试和未考试(不可交互),学生端考试(可交互)
        initData();
    }


    /**
     * 获取页面对象
     */
    private void initIntent() {

    }


    /**
     * 初始化视图
     *
     * @param view
     */
    public void initView(View view) {
        tv_content = view.findViewById(R.id.tv_content);
        lv = view.findViewById(R.id.lv);
        llShowAnswer = view.findViewById(R.id.ll_show_answer);
        tv_own_answer = view.findViewById(R.id.tv_own_answer);
        tv_right_answer = view.findViewById(R.id.tv_right_answer);
        lv_show_answer = view.findViewById(R.id.lv_show_answer);
        tv_parse_answer = view.findViewById(R.id.tv_parse_answer);

    }


    /**
     * 设置提供选择ListView的数据,如果是已完成的状态则ListView不可点击,同时数据模型会改变
     * 下面暂时模拟的是未完成的数据模型,可操作可点击
     */
    private void initLv() {


    }


    /**
     * 初始化你的作答,正确答案,答案正确率和解析
     * 需要通过用户是否是已完成和未完成的状态来确定该部分的视图显示与隐藏,同时设置数据的数据源不一样
     * 该设置需要取已完成状态的数据源集合
     */
    private void initData() {

    }

}

